# Generated from RegionLexer.g4 by ANTLR 4.13.1
from antlr4 import *
from io import StringIO
import sys

from typing import TextIO


def serializedATN():
    return [
        4,
        0,
        12,
        90,
        6,
        -1,
        2,
        0,
        7,
        0,
        2,
        1,
        7,
        1,
        2,
        2,
        7,
        2,
        2,
        3,
        7,
        3,
        2,
        4,
        7,
        4,
        2,
        5,
        7,
        5,
        2,
        6,
        7,
        6,
        2,
        7,
        7,
        7,
        2,
        8,
        7,
        8,
        2,
        9,
        7,
        9,
        2,
        10,
        7,
        10,
        2,
        11,
        7,
        11,
        2,
        12,
        7,
        12,
        1,
        0,
        1,
        0,
        1,
        0,
        1,
        0,
        1,
        1,
        1,
        1,
        5,
        1,
        34,
        8,
        1,
        10,
        1,
        12,
        1,
        37,
        9,
        1,
        1,
        1,
        1,
        1,
        1,
        2,
        1,
        2,
        1,
        2,
        5,
        2,
        44,
        8,
        2,
        10,
        2,
        12,
        2,
        47,
        9,
        2,
        1,
        2,
        1,
        2,
        1,
        3,
        3,
        3,
        52,
        8,
        3,
        1,
        3,
        1,
        3,
        1,
        3,
        1,
        3,
        1,
        4,
        3,
        4,
        59,
        8,
        4,
        1,
        4,
        4,
        4,
        62,
        8,
        4,
        11,
        4,
        12,
        4,
        63,
        1,
        5,
        1,
        5,
        1,
        6,
        1,
        6,
        1,
        6,
        4,
        6,
        71,
        8,
        6,
        11,
        6,
        12,
        6,
        72,
        1,
        7,
        1,
        7,
        4,
        7,
        77,
        8,
        7,
        11,
        7,
        12,
        7,
        78,
        1,
        8,
        1,
        8,
        1,
        9,
        1,
        9,
        1,
        10,
        1,
        10,
        1,
        11,
        1,
        11,
        1,
        12,
        1,
        12,
        0,
        0,
        13,
        1,
        1,
        3,
        2,
        5,
        3,
        7,
        4,
        9,
        5,
        11,
        0,
        13,
        6,
        15,
        7,
        17,
        8,
        19,
        9,
        21,
        10,
        23,
        11,
        25,
        12,
        1,
        0,
        6,
        2,
        0,
        9,
        9,
        32,
        32,
        2,
        0,
        10,
        10,
        13,
        13,
        2,
        0,
        35,
        35,
        42,
        42,
        1,
        0,
        48,
        57,
        2,
        0,
        65,
        90,
        97,
        122,
        4,
        0,
        48,
        57,
        65,
        90,
        95,
        95,
        97,
        122,
        95,
        0,
        1,
        1,
        0,
        0,
        0,
        0,
        3,
        1,
        0,
        0,
        0,
        0,
        5,
        1,
        0,
        0,
        0,
        0,
        7,
        1,
        0,
        0,
        0,
        0,
        9,
        1,
        0,
        0,
        0,
        0,
        13,
        1,
        0,
        0,
        0,
        0,
        15,
        1,
        0,
        0,
        0,
        0,
        17,
        1,
        0,
        0,
        0,
        0,
        19,
        1,
        0,
        0,
        0,
        0,
        21,
        1,
        0,
        0,
        0,
        0,
        23,
        1,
        0,
        0,
        0,
        0,
        25,
        1,
        0,
        0,
        0,
        1,
        27,
        1,
        0,
        0,
        0,
        3,
        31,
        1,
        0,
        0,
        0,
        5,
        40,
        1,
        0,
        0,
        0,
        7,
        51,
        1,
        0,
        0,
        0,
        9,
        58,
        1,
        0,
        0,
        0,
        11,
        65,
        1,
        0,
        0,
        0,
        13,
        67,
        1,
        0,
        0,
        0,
        15,
        74,
        1,
        0,
        0,
        0,
        17,
        80,
        1,
        0,
        0,
        0,
        19,
        82,
        1,
        0,
        0,
        0,
        21,
        84,
        1,
        0,
        0,
        0,
        23,
        86,
        1,
        0,
        0,
        0,
        25,
        88,
        1,
        0,
        0,
        0,
        27,
        28,
        7,
        0,
        0,
        0,
        28,
        29,
        1,
        0,
        0,
        0,
        29,
        30,
        6,
        0,
        0,
        0,
        30,
        2,
        1,
        0,
        0,
        0,
        31,
        35,
        5,
        33,
        0,
        0,
        32,
        34,
        8,
        1,
        0,
        0,
        33,
        32,
        1,
        0,
        0,
        0,
        34,
        37,
        1,
        0,
        0,
        0,
        35,
        33,
        1,
        0,
        0,
        0,
        35,
        36,
        1,
        0,
        0,
        0,
        36,
        38,
        1,
        0,
        0,
        0,
        37,
        35,
        1,
        0,
        0,
        0,
        38,
        39,
        6,
        1,
        0,
        0,
        39,
        4,
        1,
        0,
        0,
        0,
        40,
        41,
        7,
        2,
        0,
        0,
        41,
        45,
        4,
        2,
        0,
        0,
        42,
        44,
        8,
        1,
        0,
        0,
        43,
        42,
        1,
        0,
        0,
        0,
        44,
        47,
        1,
        0,
        0,
        0,
        45,
        43,
        1,
        0,
        0,
        0,
        45,
        46,
        1,
        0,
        0,
        0,
        46,
        48,
        1,
        0,
        0,
        0,
        47,
        45,
        1,
        0,
        0,
        0,
        48,
        49,
        6,
        2,
        0,
        0,
        49,
        6,
        1,
        0,
        0,
        0,
        50,
        52,
        5,
        13,
        0,
        0,
        51,
        50,
        1,
        0,
        0,
        0,
        51,
        52,
        1,
        0,
        0,
        0,
        52,
        53,
        1,
        0,
        0,
        0,
        53,
        54,
        5,
        10,
        0,
        0,
        54,
        55,
        1,
        0,
        0,
        0,
        55,
        56,
        6,
        3,
        1,
        0,
        56,
        8,
        1,
        0,
        0,
        0,
        57,
        59,
        5,
        45,
        0,
        0,
        58,
        57,
        1,
        0,
        0,
        0,
        58,
        59,
        1,
        0,
        0,
        0,
        59,
        61,
        1,
        0,
        0,
        0,
        60,
        62,
        3,
        11,
        5,
        0,
        61,
        60,
        1,
        0,
        0,
        0,
        62,
        63,
        1,
        0,
        0,
        0,
        63,
        61,
        1,
        0,
        0,
        0,
        63,
        64,
        1,
        0,
        0,
        0,
        64,
        10,
        1,
        0,
        0,
        0,
        65,
        66,
        7,
        3,
        0,
        0,
        66,
        12,
        1,
        0,
        0,
        0,
        67,
        68,
        7,
        4,
        0,
        0,
        68,
        70,
        4,
        6,
        1,
        0,
        69,
        71,
        7,
        5,
        0,
        0,
        70,
        69,
        1,
        0,
        0,
        0,
        71,
        72,
        1,
        0,
        0,
        0,
        72,
        70,
        1,
        0,
        0,
        0,
        72,
        73,
        1,
        0,
        0,
        0,
        73,
        14,
        1,
        0,
        0,
        0,
        74,
        76,
        7,
        4,
        0,
        0,
        75,
        77,
        7,
        5,
        0,
        0,
        76,
        75,
        1,
        0,
        0,
        0,
        77,
        78,
        1,
        0,
        0,
        0,
        78,
        76,
        1,
        0,
        0,
        0,
        78,
        79,
        1,
        0,
        0,
        0,
        79,
        16,
        1,
        0,
        0,
        0,
        80,
        81,
        5,
        43,
        0,
        0,
        81,
        18,
        1,
        0,
        0,
        0,
        82,
        83,
        5,
        45,
        0,
        0,
        83,
        20,
        1,
        0,
        0,
        0,
        84,
        85,
        5,
        124,
        0,
        0,
        85,
        22,
        1,
        0,
        0,
        0,
        86,
        87,
        5,
        40,
        0,
        0,
        87,
        24,
        1,
        0,
        0,
        0,
        88,
        89,
        5,
        41,
        0,
        0,
        89,
        26,
        1,
        0,
        0,
        0,
        8,
        0,
        35,
        45,
        51,
        58,
        63,
        72,
        78,
        2,
        6,
        0,
        0,
        0,
        1,
        0,
    ]


class RegionLexer(Lexer):
    atn = ATNDeserializer().deserialize(serializedATN())

    decisionsToDFA = [DFA(ds, i) for i, ds in enumerate(atn.decisionToState)]

    Whitespace = 1
    InLineComment = 2
    LineComment = 3
    Newline = 4
    Integer = 5
    RegionName = 6
    BodyName = 7
    Plus = 8
    Minus = 9
    Bar = 10
    LParen = 11
    RParen = 12

    channelNames = ["DEFAULT_TOKEN_CHANNEL", "HIDDEN"]

    modeNames = ["DEFAULT_MODE"]

    literalNames = ["<INVALID>", "'+'", "'-'", "'|'", "'('", "')'"]

    symbolicNames = [
        "<INVALID>",
        "Whitespace",
        "InLineComment",
        "LineComment",
        "Newline",
        "Integer",
        "RegionName",
        "BodyName",
        "Plus",
        "Minus",
        "Bar",
        "LParen",
        "RParen",
    ]

    ruleNames = [
        "Whitespace",
        "InLineComment",
        "LineComment",
        "Newline",
        "Integer",
        "Digit",
        "RegionName",
        "BodyName",
        "Plus",
        "Minus",
        "Bar",
        "LParen",
        "RParen",
    ]

    grammarFileName = "RegionLexer.g4"

    def __init__(self, input=None, output: TextIO = sys.stdout):
        super().__init__(input, output)
        self.checkVersion("4.13.1")
        self._interp = LexerATNSimulator(
            self, self.atn, self.decisionsToDFA, PredictionContextCache()
        )
        self._actions = None
        self._predicates = None

    def sempred(self, localctx: RuleContext, ruleIndex: int, predIndex: int):
        if self._predicates is None:
            preds = {}
            preds[2] = self.LineComment_sempred
            preds[6] = self.RegionName_sempred
            self._predicates = preds
        pred = self._predicates.get(ruleIndex, None)
        if pred is not None:
            return pred(localctx, predIndex)
        else:
            raise Exception("No registered predicate for:" + str(ruleIndex))

    def LineComment_sempred(self, localctx: RuleContext, predIndex: int):
        if predIndex == 0:
            return self.column == 1

    def RegionName_sempred(self, localctx: RuleContext, predIndex: int):
        if predIndex == 1:
            return self.column == 1
